package sk.tuke.android4all.controls;

import sk.tuke.android4all.listeners.ShakeListener;
import android.app.Fragment;
import android.content.*;

public abstract class CustomFragment extends Fragment {
	
	private ShakeListener mShakeListener = null;
    
    @Override
    public void onResume(){
    	super.onResume();
    	mShakeListener = new ShakeListener(getActivity().getApplicationContext()) {
            @Override
            public void onShake() {
               returnAction();
            }
        };
    	mShakeListener.registerListener();
    }
    
    @Override
    public void onPause(){
    	super.onPause();
    	mShakeListener.unregisterListener();
    }
    
    public void proceedReturnedResult(int requestCode, int resultCode, Intent data){
	 	
    }
      
    public abstract void returnAction();
    
}
